<div class="relevance-form">
  <form nz-form [formGroup]="relevanceForm" role="form">

    <nz-form-item>
      <nz-form-label nzFor="" nzSpan="6" nzRequired>机构名称</nz-form-label>
      <nz-form-control nzSpan="18">
        <input type="text" nz-input nzSize="default" formControlName="groupName" autocomplete="off" placeholder="机构名称">
        <nz-form-explain *ngIf="!(relevanceForm.get('groupName').valid || relevanceForm.get('groupName').untouched)">
          <span class="text-danger" *ngIf="relevanceForm.get('groupName').hasError('required')">机构名称不能为空！</span>
        </nz-form-explain>
      </nz-form-control>
    </nz-form-item>

    <nz-form-item>
      <nz-form-label nzFor="" nzSpan="6" nzRequired>组件名称</nz-form-label>
      <nz-form-control nzSpan="18">
        <input type="text" nz-input [(ngModel)]="artifactName" nzSize="default" formControlName="artifactName"
          autocomplete="off" placeholder="组件名称">
        <nz-form-explain
          *ngIf="!(relevanceForm.get('artifactName').valid || relevanceForm.get('artifactName').untouched)">
          <span class="text-danger" *ngIf="relevanceForm.get('artifactName').hasError('required')">描述不能为空！</span>
        </nz-form-explain>
      </nz-form-control>
    </nz-form-item>

    <nz-form-item>
      <nz-form-label nzFor="" nzSpan="6" nzRequired>版本</nz-form-label>
      <nz-form-control nzSpan="18">
        <input type="text" nz-input [(ngModel)]="version" nzSize="default" formControlName="version" autocomplete="off"
          placeholder="版本号">
        <nz-form-explain *ngIf="!(relevanceForm.get('version').valid || relevanceForm.get('version').untouched)">
          <span class="text-danger" *ngIf="relevanceForm.get('version').hasError('required')">版本不能为空！</span>
        </nz-form-explain>
      </nz-form-control>
    </nz-form-item>

    <!-- <nz-form-item>
      <nz-form-label nzFor="" nzSpan="6" nzRequired>CVE Num</nz-form-label>
      <span class="form-span">{{ name }}</span>
    </nz-form-item> -->

    <nz-form-item>
      <nz-form-control class="modal-footer">
        <button nz-button nzType="primary" class="modal-footer-btn"
          (click)="addRelevance()">确&nbsp;&nbsp;&nbsp;&nbsp;定</button>
        <button nz-button nzType="primary" class="modal-footer-btn" nzGhost="true"
          (click)="destroyModal()">取&nbsp;&nbsp;&nbsp;&nbsp;消</button>
      </nz-form-control>
    </nz-form-item>
  </form>
</div>
